
CC = gcc

COMPILE_FLAG = -O0 -Wall

SRC_DIRECTORY := src
BUILD_DIRECTORY := obj
INCLUDES := -I include 

LIB = 

all: files_type files_permission files_access files_hardlink files_unhardlink files_symlink files_remove files_rename

files_type:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_type $(SRC_DIRECTORY)/files_type.c  $(LIBS)

files_permission:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_permission $(SRC_DIRECTORY)/files_permission.c  $(LIBS)

files_access:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_access $(SRC_DIRECTORY)/files_access.c  $(LIBS)

files_hardlink:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_hardlink $(SRC_DIRECTORY)/files_hardlink.c  $(LIBS)

files_unhardlink:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_unhardlink $(SRC_DIRECTORY)/files_unhardlink.c  $(LIBS)

files_symlink:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_symlink $(SRC_DIRECTORY)/files_symlink.c  $(LIBS)

files_remove:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_remove $(SRC_DIRECTORY)/files_remove.c  $(LIBS)

files_rename:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/files_rename $(SRC_DIRECTORY)/files_rename.c  $(LIBS)

clean:
	rm -rf $(BUILD_DIRECTORY)/*